﻿@model TumbaloSoft.Models.PersonaJuridica   
@{  
    Layout = "~/Views/Shared/_VendedorLayout.cshtml";
    ViewBag.Title = "Modificar Cliente Juridica";
}

<script>
    $(document).ready(function () {
        var id = $("#id");

        function updateTips(t) {
            tips
                .text(t)
                .addClass("ui-state-highlight");
            setTimeout(function () {
                tips.removeClass("ui-state-highlight", 1500);
            }, 500);
        }

        $("#dialog-form").dialog({
            autoOpen: false,
            height: 600,
            width: 600,
            modal: true,
            buttons: {
                "Buscar": function () {
                    document.getElementById('busqueda').submit()
                    $(this).dialog("close");
                },
                Cancelar: function () {
                    $(this).dialog("close");
                }
            },
            close: function () {
                allFields.val("").removeClass("ui-state-error");
            }
        });

        $("#buscar")
            .button()
            .click(function () {
                $("#dialog-form").dialog("open");
            });
    });
</script>

<script>
    // increase the default animation speed to exaggerate the effect
    //$.fx.speeds._default = 4000;
    $(function () {
        $("#dialog").dialog({
            autoOpen: false,
            resizable: false,
            height: 240,
            modal: true,
            buttons: {
                "Si": function () {
                    $("#form_1").submit();
                    $(this).dialog('close');
                },

                "No": function () {
                    $(this).dialog("close");
                }
            }
        });

        $("#open").click(function () {
            $("#dialog").dialog("open");
            return false;
        });
    });
</script>


          
    <!-- content -->
    <div class="body2">
        <div class="main">
            <section id="content">
                <div class="wrapper">
                   <article class="col0" >
                       <nav class="urbangreymenu">
                                <h3 class="headerbar">Mantenimiento Cliente</h3>
                                    <ul id="subMenu">
                                     <li>
									   <h5>@Html.ActionLink("Ver Lista Clientes Jurídicos", "IndexClienteJuridica")</h5>
								    </li>
                                    </ul>
                            </nav>
                       </article>


                    <!--TODO-->
                      <article class="col1">
                       <!--FORMULARIO-->
                          <form id="form_1" method="post" style="height:100% ; width: 563px">
                            <div class="pad1" style="padding-bottom: 29px; width:412px">
                                <h2 class="pad_bot1 pad_top1">Modificar Cliente Jurídico</h2>
                                <h3 class="pad_bot1 pad_top1">Datos del Cliente: </h3>
                                

                             
                                 <!--NOMBRE-->
                                <div class="row">
                                    <table style="width: 420px">
                                            <tr>                                
                                              <td style="width: 210px"><span>Razón Social:</span></td>
                                              <td style="width: 210px">     
                                                    @Html.TextBoxFor(model => model.prRazonSocial, new { @Class ="input", maxlength = "30", minlength = "1", onkeypress="return validar_texto_separado(event,'mensaje')"}) 
                                                    @Html.ValidationMessageFor(model => model.prRazonSocial) 
                                              </td>
                                            </tr>
                                    </table>
                                </div>
                             
                                  <!--RUC-->
                                            <div class="row">
                                                <table style="width: 420px">
                                                    <tr>
                                                        <td style="width: 210px"><span>RUC:</span></td>
                                                        <td style="width: 210px">                                                                                                          
                                                                @Html.TextBoxFor(model => model.prRuc, new { @Class="input",maxlength = "11", minlength = "8"})
                                                                @Html.ValidationMessageFor(model=> model.prRuc)                                                          
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>


                                    <!--DIRECCION-->
                                            <div class="row">
                                                <table style="width: 420px">
                                                    <tr>
                                                        <td style="width: 210px"><span>Direccion*:</span></td>
                                                        <td style="width: 210px"> 
                                                            @Html.TextBoxFor(model => model.prDireccion, new { @Class="input"})
                                                            @Html.ValidationMessageFor(model=> model.prDireccion,null)
                                                        </td>
                                                    </tr>
                                                </table>  
                                            </div>
                                                          
                                      <!--E-MAIL-->
                                            <div class="row">
                                                <table style="width: 420px">
                                                    <tr>
                                                        <td style="width: 210px"><span>Email:</span></td>
                                                        <td style="width: 210px"> 
                                                            @Html.TextBoxFor(model => model.prEmail, new { @Class="input"})
                                                            @Html.ValidationMessageFor(model=> model.prRuc)
                                                        </td>
                                                    </tr>
                                                </table>            
                                            </div> 
                                   <!--TELEFONO-->
                                            <div class="row">
                                                <table style="width: 420px">
                                                    <tr>
                                                        <td style="width: 210px"><span>Telefono:</span></td>
                                                        <td style="width: 210px"> 
                                                            @Html.TextBoxFor(model => model.prTelefono, new { @Class="input",maxlength = "9", minlength = "9"})
                                                            @Html.ValidationMessageFor(model=> model.prTelefono)
                                                        </td>
                                                    </tr>
                                                </table> 
                                            </div>
                                                             
                                  <table style="width: 500px">
                                    <tr>
                                        <td style="width: 167px">
									<div id="dialog" title="Modificar Cliente">
                                                    <p>Esta seguro que desea modificar los datos del cliente?</p>                                                    
                                                    <!--<a href="#" id="opener"  class="button" onClick="document.getElementById('form_1').submit()">Guardar</a>-->
                                                </div>

                                                <button id="open"  class="button">Modificar</button>

                                        </td>
                                        <td style="width: 166px"><a href="#" class="button" onclick="document.getElementById('form_1').reset()">Limpiar</a></td>
                                        <td style="width: 167px"><a href="javascript:history.go(-1)" class="button" onclick="document.getElementById('form_1').cancel()">Cancelar</a></td>
                                    </tr>
                                </table>    


                                  </div> 
                              
                            </form>
                   


                    </article>
                </div>

            </section>
        </div>
    </div>

    <!-- / content -->

    <script type="text/javascript"> Cufon.now(); </script>
